package com.mapforge.filechooser;

import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;

public class MapEditorFileChooser extends JFileChooser {

	/**
	 * Default serial version ID, here to remove warnings.
	 */
	private static final long serialVersionUID = 1L;
	private static MapEditorFileChooser fileChooser;
	private static final ImageFileFilter IMG_FILE_FILTER = new ImageFileFilter();

	private MapEditorFileChooser() {
		super();
	}

	public static MapEditorFileChooser getHandle() {
		if (fileChooser == null) {
			fileChooser = new MapEditorFileChooser();
		}
		return fileChooser;
	}

	public static ImageFileFilter getImageFileFilter() {
		return IMG_FILE_FILTER;
	}

	public void addChoosableFileFilter(FileFilter filter) {
		super.addChoosableFileFilter(filter);
	}
}
